1. Field of the Invention
The present invention generally relates to graphical user interfaces, and more specifically relates to a method, system, and computer program product for preventing unwanted application behavior.
2. Related Art
Modem software makes extensive use of windowed graphical user interfaces (GUIs) in which windows may pop up on a user's display as a result of a user operation, a background event, or other type of trigger. For example, an application may encounter an error and open a window containing an error message on the user's display or an instant messaging application may open a new chat window on the user's display when a remote user initiates a chat. The newly opened window often assumes the focus of the user interface and becomes the active application from the user's point of view. One problem with this is that the user is not always aware that one of these windows is about to open and a user input action such as typing or pressing the Escape or Enter key may be part of the user's current activity when the new window opens. This often results in a user input action being performed on the new window instead of the application window that the user was previously using. Unfortunately, these actions may be extremely undesirable in the new window. For example, if the user happens to be pressing the Escape key when a new instant message window pops up, the new window may be dismissed without the user having time to see who it was from or what it contained. This problem is becoming particularly prevalent with the increased usage of instant messaging. Not only is this annoying to the user, but the remote chat partner may have no idea that the window was closed and may wait indefinitely for a response. As another example, if the user happens to be pressing the Enter key and a new dialog box pops up, the user may inadvertently execute a default button in the dialog box, resulting in the unwanted execution of an unknown command (e.g., delete file, empty trash, reformat drive, execute program, etc).